#include"stdio_.h"
int main(){
	FILE_* pf = fopen_("log.txt","w");
	if(!pf){
		perror("pf fopen");
		return -1;
	}
	int cnt = 10;	
	const char* str = "hello world";
	while(1) {
	 	fwrite_(str , strlen(str),pf);
		sleep(1);
		printf("count:%d\n",cnt);
		if(cnt == 5){
			fflush_(pf);
		}
		cnt--;
		if(cnt == 0 ){
			break;
		}
	}
	fclose_(pf);
	return 0;
}
